// ex7_13_8b.cpp
#include <iostream>

const int Season = 4;
const char *seasons[4] = {"Spring", "Summer", "Fall", "Wall"};

struct expense
{
    double expenses[Season];
};

// void fill(const char *arr, struct expense *exp);
// void show(const char *arr, struct expense *exp);
void fill(struct expense *exp);
void show(struct expense *exp);
int main(void)
{
    expense exp;
    fill(&exp);
    show(&exp);
}

void fill(struct expense *exp)
{
    using std::cout;
    using std::cin;
    for(int i = 0; i < Season; i++)
    {
        cout << "Enter " << seasons[i] << " expenses: ";
        cin >> exp->expenses[i];
    }
}

void show(struct expense *exp)
{
    using std::cout;
    using std::cin;
    for(int i = 0; i < Season; i++)
    {
        cout << seasons[i] << " expenses: " 
             << exp->expenses[i] << "\n";
    }
}